<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="{$BASE_AV}layout.css" rel="stylesheet" type="text/css" />
<title>iduobi购物之家</title>
<script type="text/javascript" src="js/tools.js"></script>
<script type="text/javascript" src="{$BASE_AV}article.js"></script>
</head>
<body>

<div style="z-index: 1; right: 20px; top: 30px; color: rgb(255, 255, 255); position: absolute; display: none;" id="loading"><img src="{$BASE_AV}images/loader.gif"></div>

<div id="main">
  <div class="main_box">    
<!--{if $action == 'add' }-->    
<script type="text/javascript" src="js/fckeditor/fckeditor.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ajaxfileupload.js"></script>
<script type="text/javascript" src="js/ThumbAjaxFileUpload.js"></script>
    <h2>添加文章</h2>
    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="t_list">
	<form name="forms" id="forms" action="index.php?m=admin/article.save" method="post"  onSubmit="return chkForm();">
      <tbody>
      <tr>
        <td class="td_right_f00">标题：</td>
        <td class="td_left" colspan="2"><input type="text" size="100" value="$editinfo[title]" id="title" name="title">
	  </td>
      </tr>
       <tr>
        <td class="td_right">选择分类：</td>
        <td class="td_left">
        $cat_id_select
        
		<div style="display:{if $editinfo[state_radio] == 3}block{else}none{/if};" class="hbox" id="lm2">
            <span id="thumb_preview">{if $editinfo[img] != ''}<img src="$editinfo[img]" width="150" height="120" style="margin-bottom:6px">{/if}</span>
	<br>
	地址：<input size="50" value="$editinfo[img]" id="thumb" name="thumb">92*68<br>
	上传：<input type="file" onchange="image_preview('thumb',this.value,1)" style="width: 400px;" id="thumb_upload" name="thumb_upload">
	&nbsp;&nbsp;<input type="button" value="上传" onclick="return ajaxFileUpload('thumb_upload','/index.php?m=tool.upload&filename=thumb_upload','#thumb_loading', 'thumb');" id="thumbupload" name="thumbupload">
    
		<img style="display:none;" src="js/loading.gif" id="thumb_loading"></div>
        </td>
      </tr>
       <tr>
        <td class="td_right">作者：</td>
        <td class="td_left"><input type="text" value="$editinfo[author]" id="author" name="author"></td>
      </tr>
      <tr>
        <td class="td_right">排序：</td>
        <td class="td_left"><input type="text" value="$editinfo[order]" id="order" name="order"></td>
      </tr>
      <tr>
        <td class="td_right">内容：</td>
        <td class="td_left">
<script language="javascript">
window.onload = function()
{
	var oFCKeditor = new FCKeditor( 'content' ) ;
    oFCKeditor.BasePath	= 'js/fckeditor/' ;
    oFCKeditor.Height	= 420 ;	
	oFCKeditor.Width	= '99%' ;	
	oFCKeditor.ReplaceTextarea() ;	
}
</script>
		<textarea name="content" id="content" rows="60" cols="100">$editinfo[content]</textarea>        
		</td>
      </tr>
      <tr>
        <td class="td_right">&nbsp;</td>
        <td class="td_left">
          <input type="hidden" name="aid" value="$editinfo[aid]" />
          <input name="submit" type="submit" class="btn05" onmouseover="this.className='btn06'" onmouseout="this.className='btn05'" id="submit" value="提交" />
          <input type="reset" name="reset_button" value="清除" class="btn05" onmouseover="this.className='btn06'" onmouseout="this.className='btn05'">
          <input type="button" name="backbutton" id="backbutton" onClick="history.back(1);" value="返回" class="btn05" onmouseover="this.className='btn06'" onmouseout="this.className='btn05'"/></td>
      </tr>
    
    </table>
    </form>

<!--{/if}-->
    
<!--{if $action == 'index' }-->
    <h2>内容列表</h2>
<form name="list_form" method="POST" action="index.php?m=admin/article.del&page={$pageCurrent}" onSubmit="return checkDelForm();">
    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="t_list">
      <tbody><tr>
      <th>&nbsp;</th>
        <th width="100">编号</th>
        <th width="160">类别</th>
        <th width="450">标题</th>
        <th width="153">状态</th>
        <th width="164">时间</th>        
        <th width="132">管理</th>
      </tr>
	  <!--{if $ErrorMsg}-->
	  <tr>
	    <td height=23 colspan=7 class=forumRowHigh align=center>$ErrorMsg</td>
	  </tr>
	  <!--{/if}-->      
      <!--{loop $rs $k $v}-->
      <tr onmouseout="this.style.background='#fff'" onmouseover="this.style.background='#f6f9fd'" style="background: none repeat scroll 0% 0% rgb(255, 255, 255);">
      
      <td><input type="checkbox" value="$v[aid]" name="id_a[]"></td>
      <td>$v[aid]</td>
      <td><a href="index.php?m=admin/article.add&amp;aid=$v[aid]">$v[class_name]</a></td>
      <td class="td_left">$v[title]</td> 
      <td><div style="color: rgb(170, 0, 0);">$v[state_name]</div></td> 
      <td>$v[time]</td> 
      <td><a href="index.php?m=admin/article.add&amp;aid=$v[aid]">修改</a>| <a href="index.php?m=admin/article.del&amp;aid=$v[aid]">删除</a></td>
      </tr>
      <!--{/loop}-->      
      <tr style="background: none repeat scroll 0% 0% rgb(248, 248, 248);">
              <td><input type="checkbox" name="select_all_btn" onclick="select_fx();"></td>
              <td class="td_left" colspan="6">
            <input type="submit" onclick="return confirm('确定要执行这次操作吗？')" class="btn02" value="删除所选" name="Submit">
            <input type="hidden" value="del" name="action">
      </td></tr>
      </tbody></table>
      </form>
      {$page}
<!--{/if}-->     


	</div>
</div>
</body>
</html>